package com.robot.mannge.common.entity.sys;

import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsNotNull;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.robot.mannge.common.entity.BaseSuperAutoPkDO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.security.core.userdetails.UserDetails;

/**
 * @Author: Smile
 * @Date: 2024/01/25/15:49
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_user")
@TableComment("管理平台用户表")
public class SysUserDO extends BaseSuperAutoPkDO<SysUserDO> {

    @Column(comment = "登录的用户名", length = 20, defaultValue = "")
    @IsNotNull
    private String username;

    @Column(comment = "登录的密码", length = 100, defaultValue = "")
    @IsNotNull
    private String password;

    @Column(comment = "真实姓名", length = 20, defaultValue = "")
    @IsNotNull
    private String realName;

    @Column(comment = "用户昵称",length = 50)
    private String nickName;

    @Column(comment = "部门id")
    private Long deptId;

    @Column(comment = "部门名称", length = 100,defaultValue = "")
    private String deptName;

    @Column(comment = "性别 0-男，1-女")
    private Integer gender;

    @Column(comment = "手机号",length = 20,defaultValue = "")
    @IsNotNull
    private String phone;

    @Column(comment = "邮箱",length = 30)
    private String email;

    @Column(comment = "头像",defaultValue = "")
    private String avatar;

    @Column(comment = "是否是管理员，0-不是，1-是",type = MySqlTypeConstant.TINYINT,defaultValue = "0")
    private Integer isAdmin;

    @Column(comment = "是否删除 1-未删除，0-已删除",type = MySqlTypeConstant.TINYINT,defaultValue = "1")
    private Integer isDelete;

    @Column(comment = "账号是否过期  1-未过期，0-已过期",type = MySqlTypeConstant.TINYINT,defaultValue = "1")
    @IsNotNull
    private boolean isAccountNonExpired;

    @Column(comment = "账号是否被锁定  1-未锁定，0-已锁定",type = MySqlTypeConstant.TINYINT,defaultValue = "1")
    @IsNotNull
    private boolean isAccountNonLocked;

    @Column(comment = "密码是否过期  1-未过期，0-已过期",type = MySqlTypeConstant.TINYINT,defaultValue = "1")
    @IsNotNull
    private boolean isCredentialsNonExpired;

    @Column(comment = "账号是否可用  1-可用，0-不可用",type = MySqlTypeConstant.TINYINT,defaultValue = "1")
    @IsNotNull
    private boolean isEnabled;




}
